package com.baj.ldap.entry;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.ToString;
import org.springframework.ldap.odm.annotations.Attribute;
import org.springframework.ldap.odm.annotations.Entry;
import org.springframework.ldap.odm.annotations.Id;

import javax.naming.Name;
import java.io.Serializable;


/**
 * 人员实体类
 */
@Data
@ToString
@Entry(objectClasses = {"top", "person", "organizationalPerson", "user"}, base = "dc=b-and-qchina,dc=com")
public class Person implements Serializable {

    @Id
    @JsonIgnore
    private Name uid;


    @Attribute(name = "cn")
    private String cn;
    /**
     * 名字
     */
    @Attribute(name = "sn")
    private String sn;
    /**
     * dn
     */
    @Attribute(name = "distinguishedName")
    private String dn;
    /**
     * 人员姓名
     */
    @Attribute(name = "name")
    private String name;
    /**
     * 描述
     */
    @Attribute(name = "description")
    private String description;
    /**
     * 部门
     */
    @Attribute(name = "ou")
    private String ou;
    /**
     * 姓
     */
    @Attribute(name = "givenName")
    private String givenName;
    /**
     * 用户密码
     */
    @Attribute(name = "userPassword")
    private String userPassword;
    /**
     * 联系电话
     */
    @Attribute(name = "telephoneNumber")
    private String telephoneNumber;
    /**
     * 手机号
     */
    @Attribute(name = "mobile")
    private String mobile;
    /**
     * 显示名称
     */
    @Attribute(name = "displayName")
    private String displayName;
    /**
     * 公司
     */
    @Attribute(name = "company")
    private String company;
    /**
     * 部门
     */
    @Attribute(name = "department")
    private String department;
    /**
     * 职位
     */
    @Attribute(name = "title")
    private String title;
    /**
     * 上次登录时间
     */
    @Attribute(name = "lastLogonTimestamp")
    private String lastLogonTimestamp;
    /**
     * 创建时间
     */
    @Attribute(name = "whenCreated")
    private String createTime;
    /**
     * 修改时间
     */
    @Attribute(name = "whenChanged")
    private String modifyTime;

    /**
     * 是否删除
     */
    @Attribute(name = "isDeleted")
    private Boolean isDelete;
    /**
     * 邮箱地址
     */
    @Attribute(name = "mail")
    private String mail;
    /**
     * 邮箱昵称
     */
    @Attribute(name = "mailNickName")
    private String mailNickName;

    @Attribute(name = "physicalDeliveryOfficeName")
    private String physicalDeliveryOfficeName;

    @Attribute(name = "sAMAccountName")
    private String sAMAccountName;

    @Attribute(name = "userPrincipalName")
    private String userPrincipalName;


}
